package cn.tonyandmoney.voicenotes.notes.model

import cn.tonyandmoney.voicenotes.greendao.utils.GreenDaoHelper
import cn.tonyandmoney.voicenotes.notes.entity.TNote

/**
 * 笔记详情的封装方法
 */
class NoteDetailsModel {


    fun loadById(id: Long): TNote {
        return GreenDaoHelper.session().tNoteDao.load(id)
    }

    fun saveNote(note: TNote) {
        GreenDaoHelper.session().tNoteDao.update(note)
    }

}